<template>
    <div id="header">
      <div class="header-left">
        <span class="iconfont">&#xe74a;</span>
      </div>
      <div class="header-center">
        <span class="iconfont">&#xe62a;</span>
        <input type="text" placeholder="输入城市/景点/游玩主题">
      </div>
      <router-link to="/city" tag="div">
        <div class="header-right">
          <span>{{this.$store.state.city}}</span>
          <span class="iconfont">&#xe631;</span>
        </div>
      </router-link>
    </div>
</template>

<script>
    export default {
        name: "Header",
        props:{
          city:String
        }
    }
</script>

<style lang="stylus" scoped>
  #header{
    display:flex;
    justify-content:space-around;
    width:100%;
    height:.6rem;
    background:#60dfe5;
    align-items:center;
    .header-left{
      font-size:.2rem;
      color:white;
      margin-right:.1rem;
      margin-left:.05rem;
    }
    .header-center{
      flex:1;
      background:white;
      height:.3rem;
      line-height:.3rem;
      border-radius:5px;
      span{
        display:inline-block;
        margin-left:.1rem;
        font-size:.2rem;
        color:#cacaca;
        vertical-align:middle;
      }
      input{
        width:80%;
        vertical-align:middle;
        height:.2rem;
      }
    }
    .header-right{
      font-size:.13rem;
      color:white;
      margin-left:.1rem;
      margin-right:.05rem;
      .iconfont{
        font-size:.05rem;
      }
    }

  }
</style>
